
Texture2D		txDiffuse : register( t0 );
Texture2D		txDiffuse2 : register( t1 );
SamplerState	samLinear : register( s0 );

cbuffer ConstantBuffer : register( b0 )
{
	matrix Projection;
}

cbuffer WorldBuffer : register( b1 )
{
	matrix World;
}

struct VS_IN
{
	float4 Pos	: POSITION;
	float2 Tex	: TEX;
};

struct VS_OUT
{
	float4	Pos : SV_Position;
	float2	Tex : TEXCOORD0;
};

VS_OUT VS( VS_IN In )
{
	VS_OUT Out = (VS_OUT)0;
	Out.Pos = In.Pos;
	Out.Pos = mul( World, Out.Pos );
	Out.Pos = mul( Projection, Out.Pos );
	Out.Tex = In.Tex;
	return Out;
}

float4 PS( VS_OUT In ) : SV_Target
{
	return txDiffuse.Sample( samLinear, In.Tex ) * txDiffuse2.Sample( samLinear, In.Tex ).a;
//	return float4( 1.0f, 1.0f, 1.0f, 1.0f );
//	return txDiffuse.Sample( samLinear, In.Tex ) * In.Col;
//	return In.Col;
}
